<?php

error_reporting(0);
require_once ("../in/tren.php");
header("content-type:text/html; charset=UTF-8");
@session_start();
//require_once ("../in/tren.php");
$tit = 'Game Mobile';
echo '<div class="navigation"><b>Game Mobile</b></div>';
echo '<div align="right"><div style="border-top: 3px solid #13cfeb;"></div></div><div class="main_menu">';
$sql = @mysql_query("SELECT * FROM game WHERE id='" . $_GET ['id'] . "'");
if ($set ['taive'] != op && !$user_id) {
    echo '<span style="color:blue">Hãy <a href="' . $set ['home'] . '/log.php">Đăng Nhập</a> hoặc <a href="' . $set ['home'] . '/reg.php">Đăng Kí</a> để tải game.';
} else {
    if (mysql_num_rows($sql) == 0) {
        echo '<img src="../img/loi.png"> Đường dẫn đến ID không hợp lệ hoặc nó đã bị xóa!</div>';
    } else {
        $ar = mysql_fetch_array($sql);
        mysql_query("UPDATE `game` SET `down` = `down`+'1' where id = '" . $_GET ['id'] . "'");
        header('Location:' . $set ['home'] . '/fgame/' . $ar ['link'] . '');
    }
}
require_once ("../in/duoi.php");
?>
